package com.bitdf.txing.group.config;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.io.IOException;

/**
 * 配置Redisson
 * @author Li zhiwei
 */
@Configuration
public class MyRedissonConfig {
//    @Bean(destroyMethod = "shutdown")
//    public RedissonClient redisson() throws IOException{
//        Config config = new Config();
//        config.useSingleServer().setAddress("redis://124.71.1.148:6379").setPassword("lzw_redis")
//                .setPingConnectionInterval(1000) //**此项务必设置为redisson解决之前bug的timeout问题关键*****
//        ;
//        RedissonClient redissonClient = Redisson.create(config);
//        return redissonClient;
//    }
}
